package com.yan.linkedmapdemo;

import java.util.HashMap;
import java.util.LinkedHashMap;

/**
 * @author taoge
 * @Date 2024/8/2 9:15
 * @Description
 */
public class Demo {
    public static void main(String[] args) {
        LinkedHashMap<Integer, Student> map = new LinkedHashMap<Integer, Student>();
        map.put(1 , new Student("zs" , 18));
        map.put(4 , new Student("ls" , 18));
        map.put(3 , new Student("tom" , 18));
        map.put(2 , new Student("lisa" , 18));
        System.out.println(map);
        HashMap<Integer, Student> map1 = new HashMap<>();
        map1.put(1 , new Student("zs" , 18));
        map1.put(4 , new Student("ls" , 18));
        map1.put(3 , new Student("tom" , 18));
        map1.put(2 , new Student("lisa" , 18));
        System.out.println(map1);
    }
}
